import { request } from './request'

export const pageReview= (params: App.PageReviewParams): Promise<App.PageResponse<App.ReviewItem>> => {
  return request({
    method: 'post',
    data: params,
    url:'/review/page'
  })
}

export const addOrUpdateReview = (params: App.ReviewItem):Promise<App.ResponseCore>=>{
  return request({
    method: 'post',
    data: params,
    url:'/review/addOrUpdate'
  })
}

export const detailReview = (params: App.DetailParams):Promise<App.ReviewItem> => {
  return request({
    method: 'get',
    params,
    url:"/review/detail"
  })
}

export const deleteReview = (params: App.DetailParams): Promise<App.ResponseCore> => {
  return request({
    method: 'get',
    params,
    url:'/review/delete'
  })
}

export const listReview = ():Promise<App.ReviewItem[]> => {
  return request({
    method: 'get',
    url:'/review/list'
  })
}


